From: Jasper St. Pierre Date: Wed, 7 Aug 2013 10:44:38 +0000 (-0400) Subject: network: Make sure not to checkConnection on the wireless section X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3782 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f74567fbab7d0aa1b35237eadef49bdef33103d5;p=gnome-shell.git network: Make sure not to checkConnection on the wireless section As the wireless section does not contain checkConnection. --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index fc0f47bd1..751711823 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1571,9 +1571,10 @@ const NMApplet = new Lang.Class({ this._vpnSection.checkConnection(connection); } else { let devices = this._devices[section].devices; - for (let i = 0; i < devices.length; i++) { - devices[i].checkConnection(connection); - } + devices.forEach(function(wrapper) { + if (wrapper instanceof NMConnectionSection) + wrapper.checkConnection(connection); + }); } },